import { useIndexView } from '@ibiz-template/react-util';
import { Outlet } from 'react-router-dom';
import { AppLayout } from '../../components/common';
import { AppMenu } from '../../components/widget';

export function IndexView() {
  const v = useIndexView('PSSYSAPPS/Web/PSAPPINDEXVIEWS/AppIndex.json');

  if (v.complete === false) {
    return <div>loading</div>;
  }

  return (
    <AppLayout menu={<AppMenu model={v.model.appMenu} context={v.context} />}>
      <Outlet />
    </AppLayout>
  );
}
// 首页视图
export default IndexView;
